package br.com.alugargaragem.ui.stripes.converter;

import java.util.Collection;
import java.util.Locale;

import net.sourceforge.stripes.validation.EmailTypeConverter;
import net.sourceforge.stripes.validation.TypeConverter;
import net.sourceforge.stripes.validation.ValidationError;
import br.com.alugargaragem.domain.vo.Email;

public class EmailConverter implements TypeConverter<Email> {

	@Override
	public Email convert(String input, Class<? extends Email> targetType,
			Collection<ValidationError> errors) {
		input = new EmailTypeConverter().convert(input, String.class, errors);
		return new Email(input);
	}

	@Override
	public void setLocale(Locale locale) {
		// TODO Auto-generated method stub

	}

}
